﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.NetworkInformation;
using System.Text;

namespace Licesing.Keys
{
    public static class HardwareAddresses
    {
        
        public static void PrintMacAddress()
        {
           
            foreach (NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces())
            {
                Console.WriteLine("");
                if (nic.OperationalStatus == OperationalStatus.Up)
                {
                    var mac = new MacAdress(nic.GetPhysicalAddress().GetAddressBytes());
                    Console.WriteLine(String.Format("{4}Name :{0},{4}Description : {1}, {4}ID: {2},{4}MAC : {3}",
                        nic.Name, nic.Description, nic.Id, mac, Environment.NewLine));
      
                }
            }
          
        }
    }
}
